# Contributor: Leon ROUX <leon.roux@federate.us>
# Maintainer: Leon ROUX <leon.roux@federate.us>
pkgname=serialdv
pkgver=1.1.4
pkgrel=0
pkgdesc="C++ Minimal interface to encode and decode audio with AMBE3000 based devices in packet mode over a serial link"
url="https://github.com/f4exb/serialDV"
license="GPL-3.0-only"
arch="all"
makedepends="
	cmake
	linux-headers
	samurai
	"
subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/f4exb/serialDV/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/serialDV-$pkgver"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -O2 -flto=auto" \
	CXXFLAGS="$CXXFLAGS -O2 -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_RPATH=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
879b2ae84a18ca4f4e0eda72208b596a9988e32eba0b3be4b5818b15b600d71c3ee53e6215126ff013d993237d29077ffedfb6be0477c852d4215e5e036bebc9  serialdv-1.1.4.tar.gz
"
